<?php
	@session_start();
	
	error_reporting(E_ALL);
	
	define('DB_NAME', 'cv');
	define('DB_USER', 'root');
	define('DB_PASSWORD', '');
	
	define('VALID_FORMATS', 'application/msword,application/octet-stream,text/plain,application/vnd.openxmlformats-officedocument.wordprocessingml.document');
	define('VALID_EMAIL_REGEX', "/[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}/i");
	
	define('SITE_FOLDER', basename(dirname(dirname(__FILE__))));
	define('SITE_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/' . SITE_FOLDER . '/');
	define('DOC_ROOT', $_SERVER['DOCUMENT_ROOT'] . '/'.SITE_FOLDER.'/');
	
	define('APP_PATH', DOC_ROOT . 'app/');
	define('PUBLIC_PATH', DOC_ROOT . 'public/');
	define('PUBLIC_HTTP_PATH', SITE_URL . 'public/');
	define('DOCUMENT_PATH', PUBLIC_PATH . 'documents/');
	define('TMP_DOCUMENT_PATH', DOCUMENT_PATH . 'tmp/');
	define('CLASSES_PATH', APP_PATH . 'class/');
	define('CSS_HTTP_PATH', PUBLIC_HTTP_PATH . 'css/');
	define('JS_HTTP_PATH', PUBLIC_HTTP_PATH . 'javascripts/');
	define('IMAGES_HTTP_PATH', PUBLIC_HTTP_PATH . 'images/');
	define('HEADER_FILE', APP_PATH . 'header.php');
	define('FOOTER_FILE', APP_PATH . 'footer.php');
	
	
	
	//Messages
	define('MULTIPLE_ANNOTATION', 'We might have found multiple email in your file.');
	
	spl_autoload_register(function ($class) {
		include_once(CLASSES_PATH . $class . '.php');
	});
?>